﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Security.Cryptography;

namespace Salon
{
    class Global
    {
        //tutaj w zmiennych statycznych możemy sobie przechowyać 
        //wszelakie zmienne globalne
        public static User currentUser { get; set; }

        public static String EncodePassword(String originalPassword)
        {
            //Declarations
            Byte[] originalBytes;
            Byte[] encodedBytes;
            MD5 md5;

            //Instantiate MD5CryptoServiceProvider, get bytes for original password and compute hash (encoded password)
            md5 = new MD5CryptoServiceProvider();
            originalBytes = ASCIIEncoding.Default.GetBytes(originalPassword);
            encodedBytes = md5.ComputeHash(originalBytes);

            //Convert encoded bytes back to a 'readable' string
            return BitConverter.ToString(encodedBytes);
        }
    }
}
     // czyta dane do comboboxa z pliku xml

     public static XmlNodeList loadcomboxml( string file)
        {
            XmlDocument cou = new XmlDocument( file);

            XmlNodeList c;

            return c;
        }

// szkielet  wypelnia comboboxa z pliku xml
public static comboBox felcountrys ( XmlNodeList g) {
     comboBox k;
     return k ;
}
   
// skielet wypelnia combobox z data seta
 public static  comboBox felcountrys (dataset) {
     comboBox k;
     return k ;
}

}